﻿#ifndef SEMIAUTOMEASURE_H
#define SEMIAUTOMEASURE_H

#include "MeasureView/MeasureDataSet.h"
#include "MeasureView/MeasureCircleCenterSA.h"
#include "MeasureView/MeasureCircle2PSA.h"
#include "MeasureView/MeasureLineWidthSA.h"
#include "MeasureView/MeasureView_global.h"
#include "opencv2/core.hpp"
namespace Qly {

class MEASUREVIEW_EXPORT SemiAutoMeasure
{
public:
    SemiAutoMeasure(MeasureDataSet* dataSet);
    void semiAutoMeasure(MeasureElement *element, cv::Mat &grayMat);
private:
    bool semiAutoOuterCircle(MeasureCircleCenterSA * element, cv::Mat &edgeMat);
    bool semiAutoInnerCircle(MeasureCircle2PSA *element, cv::Mat &edgeMat);
    bool semiAutoLineWidth(MeasureLineWidthSA *element, cv::Mat & edgeMat);

    MeasureDataSet* pDataSet = nullptr;
};

}


#endif // SEMIAUTOMEASURE_H
